package org.hefan.hrm.controller;

import org.hefan.hrm.service.ISmsVerifyCodeService;
import org.hefan.hrm.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/smsVerifyCode")
public class SmsVerifyCodeController {

    @Autowired
    private ISmsVerifyCodeService smsVerifyCodeService;

    @PostMapping("/verify")
    public AjaxResult verifySmsCode(@RequestBody Map<String, String> params) {
        return smsVerifyCodeService.verifySmsCode(params);
    }

    @PostMapping("/sendVerifyCode")
    public AjaxResult sendVerifyCode(@RequestBody Map<String, String> params) {
        return smsVerifyCodeService.sendCode(params);
    }
}
